/**
 * Created by Administrator on 2019/5/22.
 */
var arr =[100,2,3,500,600,900,56];
var min = arr[0];
var max =arr[0];
for(var i=1;i<arr.length;i++){
    if(arr[i]>max){
        max = arr[i];
    }
    if(arr[i]<min){
        min = arr[i];
    }
}
console.log("最小值"+min);
console.log("最大值"+max);